<h1>Public: Registering an OAuth Consumer Application</h1>

<%%= error_messages_for :<%= singular_name %> %>

<%% form_for(:<%= singular_name %>, :url => <%= plural_name %>_path) do |f| %>
  <div class='hint'>
    Note: Your consumer key and secret will be provided after registration
  </div>
  <dl>
    <dt>
      <label for="<%= singular_name %>_callback_url">
        Callback URL
      </label><span>OAuth consumer callback URL</span>
    </dt>
    <dd><%%= f.text_field :callback_url %></dd>
  </dl>

  <div class='hint'>
    Note: Please configure your OAuth Consumer application to use the following URLs
  </div>
  <dl>
    <dt><label for="">Request token URL</label></dt>
    <dd><%%= request_token_<%= singular_name %>_url("oauth") %>
    <dt><label for="">Authorization URL</label></dt>
    <dd><%%= authorize_<%= singular_name %>_url("oauth") %>
    <dt><label for="">Access token URL</label></dt>
    <dd><%%= access_token_<%= singular_name %>_url("oauth") %>
  </dl>
  <p>
    <%%= submit_tag "Register" %>
  </p>
<%% end %>

<%%= link_to 'Back', <%= plural_name %>_path %>